MAKESUBDIR 	:= subdir

include ./$(MAKESUBDIR)

all:
	@list='$(SUBDIRS)'; for subdir in $$list; do \
                (cd $$subdir && make all); \
		if [ $$? -ne 0 ]; then \
			echo "Building $$subdir is failed !"; \
			exit $$?; \
		fi; \
	done;

.PHONY: clean
clean:
	@list='$(SUBDIRS)'; for subdir in $$list; do \
                echo "Clean in $$subdir"; \
                (cd $$subdir && make clean); \
	done

